﻿using System;
using System.Windows;
using System.Linq.Expressions;

namespace Kiva7.Utilities
{
    public static class DependencyPropertyExt
    {
        public static DependencyProperty Register<TClass, TProperty>(Expression<Func<TClass, TProperty>> expression, PropertyMetadata metadata)
        {
            return DependencyProperty.Register(Name.Of(expression), typeof (TProperty), typeof (TClass), metadata);
        }

        public static DependencyProperty RegisterAttached<TClass, TProperty>(Expression<Func<TClass, TProperty>> expression, PropertyMetadata metadata)
        {
            return DependencyProperty.RegisterAttached(Name.Of(expression), typeof(TProperty), typeof(TClass), metadata);
        }

    }
}
